package view.tip
{
	import data.Globals;
	
	import flash.display.Sprite;

	/**
	 *@author CrazyChen
	 *2013-6-8
	 *public class MonsterTip extends BaseTip
	 *
	 */
	public class MonsterTip extends BaseTip
	{
		public function MonsterTip()
		{
			super();
		}
		
		public function show(_x:int,_y:int,hp:int,energy:int,exp_rad:int,hurt:int):void{
			(Globals.gameView as Sprite).addChild(this);
			var html:String='';
			html+=	"<font color='#CFF1F2'>       血量： </font>"+hp+"\n";
			html+=	"<font color='#CFF1F2'>   能量值：</font>"+energy+"\n";
			html+=	"<font color='#CFF1F2'>伤害半径：</font>"+exp_rad+"\n";
			html+=	"<font color='#CFF1F2'>单体伤害：</font>"+hurt+"\n";
			txt.htmlText = html;
			sprite.width = txt.width;
			sprite.height = txt.height;
			this.x = _x;
			this.y = _y;
			if(this.x>Globals.stage_width){
				this.x = Globals.stage_width - this.width;
			}
			if(this.y>Globals.stage_height){
				this.y = Globals.stage_height - this.height;
			}
		}
	}
}